package cn.hhj.utils;

import cn.hhj.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 其他类的熔断方法
 */
public class FallbackExceptionUtil {
    public static User fallbackMethod(@PathVariable("id") Long id, Throwable e){
        e.printStackTrace();
        return new User(-1L,"熔断了","当前请求服务不可用，请稍后重试！");
    }
}
